﻿using AutoMapper;
using B.Rabbit.DataBase.Domain;
using B.Rabbit.DataBase.Read.Api.Applocation.Command.Rabbit.Breeding;
using B.Rabbit.DataBase.Read.Api.Applocation.Command.Rabbit.Health;
using B.Rabbit.DataBase.Read.Api.Applocation.Command.Rabbit.Traceab;
using B.Rabbit.DataBase.Read.Api.DTOs;

namespace B.Rabbit.DataBase.Read.Api
{
    public class Mappers : Profile
    {
        public Mappers()
        {
            ///////////////////////////////////溯源信息////////////////////////////////////////
            CreateMap<AddTraceabCommand, TraceabilityModel>().ReverseMap();//添加溯源信息
            CreateMap<UpdateTraceabCommand, TraceabilityModel>().ReverseMap();//更新溯源信息


            ///////////////////////////////////养殖信息/////////////////////////////////////////
            CreateMap<AddBreedingCommand, BreedingModel>().ReverseMap();//养殖信息添加
            CreateMap<GetBreedingDTOs, BreedingModel>().ReverseMap();//养殖信息列表展示


           //////////////////////////////////保健信息///////////////////////////////////////////
            CreateMap<AddHealthCommand, HealthCareModel>().ReverseMap();//保健信息添加
            CreateMap<GetHealthDTOs, HealthCareModel>().ReverseMap();//保健信息列表显示
            CreateMap<UpdateHealthCommand, HealthCareModel>().ReverseMap();//保健信息更新


        }
    }
}
